package com.bioroadlab.pojo;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.TableGenerator;

/**
 * TestObject entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "test_object", catalog = "bioroadlab")
public class TestObject implements java.io.Serializable {

	// Fields

	private static final long serialVersionUID = 1L;

	private Integer sn;
	private String name;
	private String code;
	private String test;
	private Integer sequencingReaction;
	private Integer primer;
	private String deriveMode;
	private String geneAlias;
	private String relativity;
	private String protein;
	private String proteinAlias;
	private String proteinFunction;
	private String highGc;
	private String location;
	private Integer outviewer;
	private Integer lengthOfMrna;
	private Integer sectionNumber;
	private Integer csnps;
	private Integer codenRegionLength;
	private Integer frequency;
	private Set<TestItem> testItems = new HashSet<TestItem>(0);
	private Set<DiseaseTestObjectRel> diseaseTestObjectRels = new HashSet<DiseaseTestObjectRel>(
			0);

	// Property accessors
	@TableGenerator(table = "id_generator", name = "generator", pkColumnName = "name", pkColumnValue = "TestObject", valueColumnName = "id", initialValue = 1, allocationSize = 1)
	@Id
	@GeneratedValue(generator = "generator", strategy = GenerationType.TABLE)
	@Column(name = "sn", unique = true, nullable = false)
	public Integer getSn() {
		return this.sn;
	}

	public void setSn(Integer sn) {
		this.sn = sn;
	}

	@Column(name = "name", length = 200)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "code", length = 20)
	public String getCode() {
		return this.code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	@Column(name = "test", length = 200)
	public String getTest() {
		return this.test;
	}

	public void setTest(String test) {
		this.test = test;
	}

	@Column(name = "sequencing_reaction")
	public Integer getSequencingReaction() {
		return this.sequencingReaction;
	}

	public void setSequencingReaction(Integer sequencingReaction) {
		this.sequencingReaction = sequencingReaction;
	}

	@Column(name = "primer")
	public Integer getPrimer() {
		return this.primer;
	}

	public void setPrimer(Integer primer) {
		this.primer = primer;
	}

	@Column(name = "derive_mode", length = 100)
	public String getDeriveMode() {
		return this.deriveMode;
	}

	public void setDeriveMode(String deriveMode) {
		this.deriveMode = deriveMode;
	}

	@Column(name = "gene_alias", length = 150)
	public String getGeneAlias() {
		return this.geneAlias;
	}

	public void setGeneAlias(String geneAlias) {
		this.geneAlias = geneAlias;
	}

	@Column(name = "relativity", length = 200)
	public String getRelativity() {
		return this.relativity;
	}

	public void setRelativity(String relativity) {
		this.relativity = relativity;
	}

	@Column(name = "protein", length = 200)
	public String getProtein() {
		return this.protein;
	}

	public void setProtein(String protein) {
		this.protein = protein;
	}

	@Column(name = "protein_alias", length = 1000)
	public String getProteinAlias() {
		return this.proteinAlias;
	}

	public void setProteinAlias(String proteinAlias) {
		this.proteinAlias = proteinAlias;
	}

	@Column(name = "protein_function", length = 1000)
	public String getProteinFunction() {
		return this.proteinFunction;
	}

	public void setProteinFunction(String proteinFunction) {
		this.proteinFunction = proteinFunction;
	}

	@Column(name = "high_gc", length = 1)
	public String getHighGc() {
		return this.highGc;
	}

	public void setHighGc(String highGc) {
		this.highGc = highGc;
	}

	@Column(name = "location", length = 100)
	public String getLocation() {
		return this.location;
	}

	public void setLocation(String location) {
		this.location = location;
	}

	@Column(name = "outviewer")
	public Integer getOutviewer() {
		return this.outviewer;
	}

	public void setOutviewer(Integer outviewer) {
		this.outviewer = outviewer;
	}

	@Column(name = "length_of_mrna")
	public Integer getLengthOfMrna() {
		return this.lengthOfMrna;
	}

	public void setLengthOfMrna(Integer lengthOfMrna) {
		this.lengthOfMrna = lengthOfMrna;
	}

	@Column(name = "section_number")
	public Integer getSectionNumber() {
		return this.sectionNumber;
	}

	public void setSectionNumber(Integer sectionNumber) {
		this.sectionNumber = sectionNumber;
	}

	@Column(name = "csnps")
	public Integer getCsnps() {
		return this.csnps;
	}

	public void setCsnps(Integer csnps) {
		this.csnps = csnps;
	}

	@Column(name = "coden_region_length")
	public Integer getCodenRegionLength() {
		return this.codenRegionLength;
	}

	public void setCodenRegionLength(Integer codenRegionLength) {
		this.codenRegionLength = codenRegionLength;
	}

	@Column(name = "frequency")
	public Integer getFrequency() {
		return this.frequency;
	}

	public void setFrequency(Integer frequency) {
		this.frequency = frequency;
	}

	@ManyToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
	@JoinTable(name = "test_object_test_item_rel", catalog = "bioroadlab", joinColumns = { @JoinColumn(name = "test_object", nullable = false, updatable = false) }, inverseJoinColumns = { @JoinColumn(name = "test_item", nullable = false, updatable = false) })
	public Set<TestItem> getTestItems() {
		return this.testItems;
	}

	public void setTestItems(Set<TestItem> testItems) {
		this.testItems = testItems;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER, mappedBy = "testObject")
	public Set<DiseaseTestObjectRel> getDiseaseTestObjectRels() {
		return this.diseaseTestObjectRels;
	}

	public void setDiseaseTestObjectRels(
			Set<DiseaseTestObjectRel> diseaseTestObjectRels) {
		this.diseaseTestObjectRels = diseaseTestObjectRels;
	}

}